package twilight.companion.client.renderer;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.resources.ResourceLocation;
import twilight.companion.client.model.MiniYetiModel;
import twilight.companion.entity.MiniYetiEntity;

public class MiniYetiRenderer extends MobRenderer<MiniYetiEntity, MiniYetiModel<MiniYetiEntity>> {
    private static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath("twilightforest",
            "textures/model/yetialpha.png");

    public MiniYetiRenderer(EntityRendererProvider.Context context) {
        super(context, new MiniYetiModel<>(context.bakeLayer(MiniYetiModel.LAYER_LOCATION)), 0.5F);
    }

    @Override
    public ResourceLocation getTextureLocation(MiniYetiEntity entity) {
        return TEXTURE;
    }

    @Override
    protected void scale(MiniYetiEntity entity, PoseStack poseStack, float partialTickTime) {
        float scale = entity.getGrowthScale();
        poseStack.scale(scale, scale, scale);
    }
}